package com.third.bank.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 总账表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("total_accounts")
public class TotalAccounts {

    //总账表ID
    private Long id;

    //账户余额
    private BigDecimal balance;

    //交易日期
    @TableField("transaction_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private LocalDateTime transactionDate;

    //交易金额，正数表示收入，负数表示支出
    @TableField("transaction_amount")
    private BigDecimal transactionAmount;

    //交易后余额
    @TableField("post_balance")
    private BigDecimal postBalance;
}
